// ==================================================
// 工具
// ==================================================

// 清除浮动
// ------------------------------
.clearfix:after {       
  content: ".";     /*内容为“.”就是一个英文的句号而已。也可以不写。*/
  display: block;   /*加入的这个元素转换为块级元素。*/
  clear: both;     /*清除左右两边浮动。*/
  visibility: hidden;      /*可见度设为隐藏。注意它和display:none;是有区别的。visibility:hidden;仍然占据空间，只是看不到而已；*/
  line-height: 0;    /*行高为0；*/
  height: 0;     /*高度为0；*/
  font-size:0;    /*字体大小为0；*/
}
.clearfix { *zoom:1;}

.hidden
  display none
.show
  display block

// 不可见
.invisible
  visibility hidden

//ios滚动bug 让页面滚动流畅
.ios-scroll-bug
  -webkit-overflow-scrolling touch

// 小三角
// @param 颜色
// @param 尺寸
// @param 方向
// ------------------------------
triangle(color = #000, size = 10px, direction = down)
  @extend $triangle-core
  border-width (size/2)

  if direction is up
    border-style dashed dashed solid
    border-color transparent transparent color
  else if direction is right
    border-style dashed dashed dashed solid
    border-color transparent transparent transparent color
  else if direction is down
    border-style solid dashed dashed
    border-color color transparent transparent
  else if direction is left
    border-style dashed solid dashed dashed
    border-color transparent color transparent transparent
  else if direction is up-left
    border-style solid dashed dashed solid
    border-color color transparent transparent color
  else if direction is up-right
    border-style solid solid dashed dashed
    border-color color color transparent transparent
  else if direction is down-left
    border-style dashed dashed solid solid
    border-color transparent transparent color color
  else
    border-style dashed solid solid dashed
    border-color transparent color color transparent


font-dpr(font-size)
  font-size font-size

  [data-dpr="2"] &
    font-size font-size * 2

  [data-dpr="3"] &
    font-size font-size * 3
